home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / util / gnu / groff_bin_1_07.lha / Groff-1.07 / PROBLEMS < prev    next >
Text File  |  1993-03-02  |  13KB  |  355 lines

  1. This file describes various problems that have been encountered in
  2. compiling, installing and running groff.  Suggestions for additions or
  3. other improvements to this file are welcome.
  4.  
  5. * On a DECstation or other machine using a MIPS cpu, gcc/g++ 2.2.2
  6. gets a fatal signal while compiling tbl/main.c and tbl/table.c.
  7.  
  8. Upgrade to gcc 2.3 or compile those files without -O.
  9.  
  10. * I get lots of `numeric overflow' error messages whenever I run
  11. groff; I compiled groff with AT&T C++ 2.0 with an ANSI C compiler.
  12.  
  13. Make sure -DCFRONT_ANSI_BUG is included in DEFINES in the top-level
  14. Makefile.  If that doesn't solve the problem, define INT_MIN as
  15. -INT_MAX in libgroff/lib.h.
  16.  
  17. * I get errors when I try to compile groff with Sun C++.
  18.  
  19. Groff requires header files that are moderately compatible with AT&T
  20. C++ and ANSI C.  With some versions of Sun C++, the supplied header
  21. files need some of the following changes to meet this requirement:
  22. <string.h> must declare the mem* functions, (just add `#include
  23. <memory.h>' to <string.h>); the first argument to fopen and freopen
  24. should be declared as `const char *'; the first argument to fread
  25. should be declared as `void *'; the first argument to fwrite should be
  26. declared as `const void *'; malloc should be declared to return `void
  27. *'; in <alloca.h>, the declaration `extern "C" { void
  28. *__builtin_alloca(int); }' should be added; declarations of getopt(),
  29. optarg, optind and opterr should be added to <stdlib.h>; in
  30. <sys/signal.h> the return type and the second argument type of
  31. signal() should be changed to be `void (*)(int)'.
  32.  
  33. You can either change them in place, or copy them to some other
  34. directory and include that directory with a -I option.
  35.  
  36. * I get errors when I try to compile groff with DEC C++.
  37.  
  38. Rebuild the bison-generated parsers (pic/pic.cc, eqn/eqn.cc,
  39. refer/label.cc) using DEC yacc.  Fix the declaration of write() in
  40. <unistd.h> so that the second argument is a const char *.  Fix the
  41. declaration of open() in <sys/file.h> so that the first argument is a
  42. const char *.
  43.  
  44. * I get errors compiling the files eqn/eqn.cc, pic/pic.cc,
  45. refer/label.cc.  I'm not using gcc or g++ as my C++ compiler.
  46.  
  47. These files are generated by bison.  One possible problem is that
  48. they're not including <alloca.h> when they need to.  Try adding
  49. #include <alloca.h>.  Alternatively you could try regenerating the
  50. parsers using your system's version of yacc.  To do this, rename these
  51. files to something, change the definition of YACC in the top-level
  52. Makefile and rebuild.
  53.  
  54. * On Ultrix, the make stops with the message
  55.  
  56.   *** Error code 1
  57.  
  58.   Stop.
  59.  
  60. for no apparent reason.
  61.  
  62. Use GNU make.
  63.  
  64. * Groff can't handle my troff document. It works fine with AT&T troff.
  65.  
  66. Read the section on incompatibilities in gtroff(1).  Try using the -C
  67. option.  Alternatively there's the sed script in tmac/fixmacros.sed
  68. which will attempt to edit a file of macros so that it can be used
  69. with groff without the -C flag.
  70.  
  71. * groff -Tdvi produces dvi files that use fonts at weird magnifications.
  72.  
  73. Yes, it does.  You may need to compile fonts with Metafont at these
  74. magnifications. The CompileFonts script in the devdvi/generate
  75. directory may help you to do this. (It will take a *long* time.)
  76.  
  77. * pic output is not centered horizontally; pictures sometimes run off
  78. the bottom of the page.
  79.  
  80. The macro package you are using is not supplying appropriate definitions
  81. of PS and PE.  Give groff a -mpic option.
  82.  
  83. * I'm having problems including PostScript illustrations using the PSPIC
  84. macro.
  85.  
  86. A PostScript document must meet three requirements in order to be
  87. included with the PSPIC macro: it must comply with the Adobe Document
  88. Structuring Conventions; it must contain a BoundingBox line; it must
  89. be ``well-behaved''.  The BoundingBox line should be of the form:
  90.  
  91.   %%BoundingBox: llx lly urx ury
  92.  
  93. where llx, lly, urx, ury are the coordinates of the lower left x,
  94. lower left y, upper right x, upper right y of the bounding box of
  95. marks on the page expressed as integers in the default PostScript
  96. coordinate system (72 units per inch, origin at bottom left corner).
  97. A useful tactic is to print out the illustration by itself (you may
  98. need to add a `showpage' at the end), and physically measure the
  99. bounding box.  For more detail on these requirements, read the
  100. specification of Encapsulated PostScript format.  (This is available
  101. from the Adobe file server; send a message with a body of `help' to
  102. ps-file-server@adobe.com.)
  103.  
  104. * I've configured groff for A4 paper, but gtroff still seems to think
  105. that the length of a page (as returned by \n(.p) is 11 inches.
  106.  
  107. This is intentional.  The PAGE option is used only by grops.  For
  108. compatibility with ditroff, the default page length in gtroff is
  109. always 11 inches.  The page length can be changed with the `pl'
  110. request.
  111.  
  112. * Groff doesn't use the font names I'm used to.
  113.  
  114. Use the `ftr' request.  See gtroff(1).
  115.  
  116. * I get errors using the Unix -ms macros with groff -e -C.
  117.  
  118. Apply this change:
  119.  
  120. *** /usr/lib/ms/ms.eqn    Tue Apr 25 02:14:28 1989
  121. --- ms.eqn    Sun Nov 11 10:33:59 1990
  122. ***************
  123. *** 22,29 ****
  124.   ..
  125.   .    \" EN - end of a displayed equation
  126.   .de EN
  127. ! .if !\\*(10 .br
  128.   .di
  129.   .rm EZ
  130.   .nr ZN \\n(dn
  131.   .if \\n(ZN>0 .if \\n(YE=0 .LP
  132. --- 22,30 ----
  133.   ..
  134.   .    \" EN - end of a displayed equation
  135.   .de EN
  136. ! .if \\n(.k>0 .br
  137.   .di
  138. + .ds 10 \\*(EZ\\
  139.   .rm EZ
  140.   .nr ZN \\n(dn
  141.   .if \\n(ZN>0 .if \\n(YE=0 .LP
  142.  
  143.  
  144. * gpic doesn't accept the syntax `chop N M' for chopping both ends of a
  145. line.
  146.  
  147. The correct syntax is `chop N chop M'.
  148.  
  149. * With gpic -t, when I print `line ->; box' using a dvi to ps
  150. program, the arrow head sticks through into the inside of the box.
  151.  
  152. The dvi to ps program should be modified to set the line cap and
  153. line join parameters to 1 while printing tpic specials.
  154.  
  155. * When I print the output groff -Tps, the output is always shifted up
  156. by about 0.7 inches; I'm using 8.5x11 inch paper.
  157.  
  158. Make sure that PAGE is defined to be `letter' in the top-level
  159. Makefile.
  160.  
  161. * When I try to print the output of groff -Tps, I get no output at all
  162. from the printer, and the log file shows the error
  163. %%[ error: undefined; offendingcommand: BP ]%%
  164. I using TranScript spooling software.
  165.  
  166. This is a bug in the page reversal filter in early versions of
  167. TranScript.  Change the `broken' parameter in
  168. /usr/local/lib/groff/font/devps/DESC to 7.
  169.  
  170. * When I preview groff -Tps output using the Sun OpenWindows 2.0 pageview
  171. program, all the pages are displayed on top of each other.
  172.  
  173. This is a defect in pageview.  Change the `broken' parameter in
  174. /usr/local/lib/groff/font/devps/DESC to 2.
  175.  
  176. * With groff -TX75, -TX100or -X, I can only view the first page.
  177.  
  178. The left mouse button brings up a menu that allows you to view other
  179. pages.
  180.  
  181. * When I print the output of groff -Tdvi, I just get a black dot in
  182. upper left corner.
  183.  
  184. Some dvi drivers (notably early versions of xtex) do not correctly
  185. handle dvi files that use a resolution different from that used by dvi
  186. files produced by TeX.  Try getting a more up to date driver.
  187.  
  188. * I get lots of errors when I use groff with the AT&T -mm macros.
  189.  
  190. The AT&T -mm macros need a few changes to work with groff; `make
  191. install.dwbmm' will copy your -mm macros to groff's macro directory
  192. and make the necessary changes.  You may need to edit the commands for
  193. the install.mm target in the Makefile.  Alternatively use the groff
  194. -mm macros.
  195.  
  196. * gtroff doesn't understand lines like `.ce99' with no space between
  197. the name of the request or macro and the arguments.
  198.  
  199. Gtroff requires a space between macro or request and its arguments
  200. because it allows the use of long names for macros and requests.  You
  201. can use the -C option or the `cp' request to put gtroff into a
  202. compatibility mode in which it is not possible to use long names for
  203. macros but in which no space is required between macros and their
  204. arguments.  The use of compatibility mode is strongly discouraged.
  205.  
  206. * gtroff gives warnings about lines like
  207.   .ev    \" a comment
  208. (with a tab after the .ev).
  209.  
  210. A tab character cannot be used as a substitute for a space character
  211. (except in one case: between a control character at the beginning of a
  212. line and the name of a macro or request).  For example, in Unix troff
  213.   .ps    \" restore the previous point size
  214. (with a tab after the .ps) will NOT restore the previous point-size;
  215. instead it will be silently ignored.  Since this is very likely to be
  216. an error, gtroff can give a warning about it.  If you want to align
  217. comments, you can do it like this:
  218.   .ev\"                \" a comment
  219.  
  220. * I don't like the page headers and footers produced by groff -man.
  221.  
  222. There seem to be many different styles of page header and footer
  223. produced by different versions of the -man macros.  You will need to
  224. modify macros/tmac.an to suit your personal taste.  For example, if
  225. you want the center of the page header to say
  226.   UNIX Programmer's Manual
  227. you will need to change the line
  228.   .el .ds an-extra3 \"UNIX Programmer's Manual
  229. to
  230.   .el .ds an-extra3 UNIX Programmer's Manual
  231.  
  232. * While formatting a manual page, groff complains about not being able to
  233. break lines.  The problem seems to be caused by a line like:
  234.   .TP \w'label'+2
  235.  
  236. The -man documentation says that the default scale indicator for TP
  237. macro is `n'.  The groff -man macros implement this correctly, so that
  238. the argument will be evaluated as if it were
  239.   \w'label'n+2n
  240. The Unix -man macros don't implement this correctly (probably because
  241. it's hard to do in Unix troff); they just append `n' to the entire
  242. argument, so that it will be evaluated as if it were
  243.   \w'label'u+2n
  244. The solution is to fix the manual page:
  245.   .TP \w'label'u+2
  246.  
  247. * I'm having problems formatting Ultrix man pages with groff -man.
  248.  
  249. The Ultrix man pages use a number of non-standard extensions to the
  250. Unix man macros.  One solution is to use the Ultrix -man macros with
  251. groff.  Rename /usr/local/lib/groff/tmac/tmac.an to
  252. /usr/local/lib/groff/tmac/tmac.an.gnu, copy /usr/lib/tmac/tmac.an to
  253. /usr/local/lib/groff/tmac/tmac.an and apply the following patch (from
  254. Frank Wortner):
  255.  
  256. *** /usr/local/lib/groff/tmac/tmac.an     Wed Sep  9 12:29:28 1992
  257. --- /usr/lib/tmac/tmac.an       Fri Jul 24 19:58:19 1992
  258. ***************
  259. *** 489,495 ****
  260.   .     \" make special case of shift out of italic
  261.   .de }S
  262.   .ds ]F
  263. ! .if \\$12 .if !\\$5 .ds ]F \^
  264.   .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
  265.   .el \\$3
  266.   .}f
  267. --- 489,495 ----
  268.   .     \" make special case of shift out of italic
  269.   .de }S
  270.   .ds ]F
  271. ! .if \\$12 .if !\\$5 .ds ]F\^
  272.   .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
  273.   .el \\$3
  274.   .}f
  275.  
  276. Another possible solution is to install tmac/man.ultrix as
  277. /usr/local/lib/groff/tmac/man.local.
  278.  
  279. * When I preview documents using -TX75 or -TX100, the layout is not the same
  280. as when I print the document with -Tps: the line and page breaks come
  281. in different places.
  282.  
  283. Use groff -X -Tps.
  284.  
  285. * When I try to run gxditview, I get the error:
  286. Error: Widget viewport has zero width and/or height
  287.  
  288. This error means you haven't correctly installed the application
  289. defaults file, GXditview.ad; ``make install'' does this for you
  290. automatically, so either you didn't do ``make install'', or you don't
  291. have imake configured correctly.
  292.  
  293. * groff uses up an enormous amount of memory processing large files.
  294. I'm using 386BSD 0.1.
  295.  
  296. 386BSD includes an old version of g++, 1.39, which has a bug that
  297. causes a major memory leak in gtroff.  Apply the following fix to g++
  298. and recompile groff:
  299.  
  300. *** cplus-decl.c.~1~    Mon Aug  6 05:28:59 1990
  301. --- cplus-decl.c    Wed Jun  5 08:55:04 1991
  302. ***************
  303. *** 7951,7961 ****
  304.   
  305.         /* At the end, call delete if that's what's requested.  */
  306.         if (TREE_GETS_DELETE (current_class_type))
  307.       exprstmt = build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node),
  308.                         get_identifier (OPERATOR_DELETE_FORMAT),
  309. !                       build_tree_list (NULL_TREE, integer_zero_node),
  310.                         NULL_TREE, LOOKUP_NORMAL);
  311.         else if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type))
  312.       exprstmt = build_x_delete (ptr_type_node, current_class_decl, 0);
  313.         else
  314.       exprstmt = 0;
  315. --- 7951,7961 ----
  316.   
  317.         /* At the end, call delete if that's what's requested.  */
  318.         if (TREE_GETS_DELETE (current_class_type))
  319.       exprstmt = build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node),
  320.                         get_identifier (OPERATOR_DELETE_FORMAT),
  321. !                       build_tree_list (NULL_TREE, current_class_decl),
  322.                         NULL_TREE, LOOKUP_NORMAL);
  323.         else if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type))
  324.       exprstmt = build_x_delete (ptr_type_node, current_class_decl, 0);
  325.         else
  326.       exprstmt = 0;
  327.  
  328. * I'm having problems compiling groff on 386BSD 0.1.
  329.  
  330. If you're using ash as /bin/sh, you'll need the following patch.
  331.  
  332. *** gendef.sh.org    Sun Jun 30 13:30:36 1991
  333. --- gendef.sh    Sun Feb 28 10:23:49 1993
  334. ***************
  335. *** 3,9 ****
  336.   file=$1
  337.   shift
  338.   
  339. ! defs="#define $1"
  340.   shift
  341.   for def
  342.   do
  343. --- 3,10 ----
  344.   file=$1
  345.   shift
  346.   
  347. ! x=$1
  348. ! defs="#define $x"
  349.   shift
  350.   for def
  351.   do
  352.  
  353. You'll also need to change dirnamemax.c so that it doesn't use
  354. pathconf().
  355.